QuickTime 3 Reference

Previous | Chapter Top | Chapter Contents | Next

About the Tween Media Handler

The tween media handler is a track that is used exclusively as a modifier track. It is used to algorithmically generate values to modify the playback of other tracks. The tween media handler sends values to other media handlers; it never presents data. For information about modifier tracks, see the chapter "Movie Toolbox" in this book.

Using a tween media track as a modifier track differs from using a base media track in that the tween media handler only requires a start value and a stop value to be specified, whereas, a base media handler requires a series of discrete values to be specified.

The value sent to another track is the start value plus the difference between the stop value and the start value multiplied by the elapsed percentage of the duration of the sample. Thus, the value sent halfway through the sample is the start value plus the difference between the stop and start value multiplied by .50. The formula is as follows:

This kind of calculation is called interpolation . Specifically, it is a linear interpolation because the range of possible values between the start and stop values can be graphed as a straight line.

The interpolation provided by the tween media handler is implemented by tween components. There is one component for each kind of data from which the values are derived. The Apple-supplied components support the following kinds of data:

For a complete list of Apple-supplied tween components, see "Constants" .

Apple-supplied components only support linear interpolation for deriving tween values. You can implement your own components to support other data types or to perform non-linear interpolation.


© 1997 Apple Computer, Inc.

Previous | Chapter Top | Chapter Contents | Next